package com.example.satoken.common.exception;

import lombok.Data;

/**
 * @author wpz
 * 自定义的异常的消息类，用于统一的自定义的异常使用！
 */
@Data
public class GlobalsCustomExceptionMessage {

    /**
     * 状态码
     */
    private int code;


    /**
     * 返回信息
     */
    private String msg;


    /**
     * @param code
     * @param msg
     */
    public GlobalsCustomExceptionMessage(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    /**
     * 无参构造
     */
    public GlobalsCustomExceptionMessage() {
        this.code = 200;
        this.msg = "success";
    }


    /**
     *
     * @param msg 消息
     */
    public GlobalsCustomExceptionMessage(String msg) {
        this.code = 800;
        this.msg = msg;
    }

}
